import request from '@/utils/request'

// 获取员工列表
export function getEmployees(page, size) {
  return request({
    url: '/sys/user',
    params: { page, size }
  })
}

// 新增员工
export function addEmployees(data) {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}

// 删除员工
export function delEmployee(id) {
  return request({
    method: 'delete',
    url: `/sys/user/${id}`
  })
}

// 批量添加员工
export function addEmployeeBatch(data) {
  return request({
    method: 'post',
    url: `/sys/user/batch`,
    data
  })
}

// 修改员工信息
export function saveUserDetailById(data) {
  return request({
    method: 'put',
    url: `/sys/user/${data.id}`,
    data
  })
}
